package com.mzpai.product.util;

public class QRTest {

	public static void main(String[] args) {
		//生成二维码
		String content= "www.baidu.com";
//		String imgPath="D:/test/logo/logos.png";
		
		String imgPath="https://cdn.bianwaixingqiu.com/991625290646993.jpg";
			
		String destPath ="D:/test/zxing/";
		System.out.println("logo图片地址imgPath=="+imgPath);
		System.out.println("存放二维码图片的地址destPath=="+destPath);
		try {
			QRCodeUtil.encode(content,imgPath,destPath, true);
		} catch (Exception e1) {
			e1.printStackTrace();
		}
		
		
        //解析二维码
       /* String destPath1 = "D:/test/zxing/67350.jpg";
        try {
            String result = QRCodeUtil.decode(destPath1);
            System.out.println(result);
        }catch (Exception e){
            e.printStackTrace();
            System.out.println(destPath1+"不是二维码");
        }*/
	}
}
